package org.zw.store.user.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.zw.store.user.dto.LoginDto;
import org.zw.store.user.model.User;

@Mapper  //该注解表示下面的接口会被spring管理，放入spring容器中，并且是一个访问数据库的映射器对象
public interface LoginDao {

    @Select("select u_id,u_nickname,u_avatar,u_register from t_user where u_id = #{u_id} and u_pwd = #{u_pwd}")
    User findUserByIdAndPwd(LoginDto loginDto);
}
